@Service
public class ImageService {
    @Value("${upload.path}")
    private String uploadPath;
    
    @Autowired
    private ImageMapper imageMapper;
    
    public Result<?> upload(MultipartFile file) {
        // 保存文件并返回URL
        // 保存记录到数据库
    }
    
    public void view(String filename, HttpServletResponse response) {
        // 读取并输出图片
    }
} 